package com.sky.mapper;

import com.sky.entity.Category;
import com.sky.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface UserMapper {


    @Select("select * from user where openid = #{openid}")
    User getByOpenId(String openid);


    void insert(User user);

    List<Category> getTypeList(String type);

    @Select("select * from user where id = #{id}")
    User getById(Long userId);

    Integer statisticsUserNum(LocalDateTime min, LocalDateTime max);
}
